<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"> 
<head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 

<title>Login</title> 
<style type="text/css">
.loul{
		width: 900px;
		text-align: center;
        padding-top: 10px;
		list-style: none;
		float: left;
	 }
.loli{
  display:inline;
}
</style>
<body> 
<div id="main">
		<?php echo $this->element('header'); ?>
	<?php echo $this->Html->css("login"); //load file CSS riêng (app/webroot/css/login.css)?> 
	<?php echo $this->Html->css("template_thanh"); //load file CSS riêng (app/webroot/css/login.css)?>  
	<?php
	if(isset($_GET['err']) && !empty($_GET['err'])) {
			echo "<ul class=\"loul\">";
			$errors=$_GET['err'];
			echo "<li class=\"loli\">{$errors}</li>";
			echo "</ul>";
	}
	if(isset($_GET['stat']) && !empty($_GET['stat'])) {
			$message=$_GET['stat'];
			echo "<ul class=\"loul\">";
			echo "<li class=\"loli\">{$message}</li>";
			echo "</ul>";	
		}
	?>
	
    <form method="post" action="../users/login"> 
        <fieldset> 
        <legend>Login</legend> 
        <label>Username</label><input type="text" name="username" size="20" /><br /> 
        <label>Password</label><input type="password" name="password" size="20" /><br /> 
        <label>&nbsp;</label><input type="submit" name="ok" value="Login" /> <br/>
       <!—Hiển  thị thông báo lỗi nếu có--> 
	   <?php 
		if(isset($error) && !empty($error)){
			echo "<span class=\"error\">{$error}</span> ";
		}
	   ?>
        
        </fieldset> 
    </form> 
	<?php echo $this->element('footer'); ?>
</div>
</body> 
</html>